import request from '@/utils/request'

// 查询车辆备案列表
export function listPreVehicleRecord(query) {
  return request({
    url: '/billsdecl/preVehicleRecord/list',
    method: 'get',
    params: query
  })
}

export function findVehicleList(query) {
  return request({
    url: '/billsdecl/preVehicleRecord/findList',
    method: 'get',
    params: query
  })
}

export function findBdVehicleList(query) {
  return request({
    url: '/billsdecl/preVehicleRecord/findList',
    method: 'get',
    params: query
  })
}

// 查询车辆备案列表历史记录
export function listPreVehicleRecordHis(hisId) {
  return request({
    url: '/billsdecl/preVehicleRecord/getHisList/' + hisId,
    method: 'get',
  })
}


// 查询车辆备案详细
export function getPreVehicleRecord(id) {
  return request({
    url: '/billsdecl/preVehicleRecord/getInfo/' + id,
    method: 'get'
  })
}

// 新增车辆备案
export function addPreVehicleRecord(data) {
  return request({
    url: '/billsdecl/preVehicleRecord/add',
    method: 'post',
    data: data
  })
}
//绑卡
export function bindCard(data) {
  return request({
    url: '/billsdecl/preVehicleRecord/bindCard',
    method: 'post',
    data: data
  })
}

// 修改车辆备案
export function updatePreVehicleRecord(data) {
  return request({
    url: '/billsdecl/preVehicleRecord/edit',
    method: 'post',
    data: data
  })
}

// 删除车辆备案
export function delPreVehicleRecord(id) {
  return request({
    url: '/billsdecl/preVehicleRecord/remove/' + id,
    method: 'get'
  })
}


// 删除车辆备案
export function declPreVehicleRecord(id) {
  return request({
    url: '/billsdecl/preVehicleRecord/decl/' + id,
    method: 'get'
  })
}

// 删除车辆备案
export function declRepeatPreVehicleRecord(id) {
  return request({
    url: '/billsdecl/preVehicleRecord/declRepeat/' + id,
    method: 'get'
  })
}

// 删除车辆备案
export function chargebackPreVehicleRecord(id) {
  return request({
    url: '/billsdecl/preVehicleRecord/chargeback/' + id,
    method: 'get'
  })
}


// 导出车辆备案
export function exportPreVehicleRecord(query) {
  return request({
    url: '/billsdecl/preVehicleRecord/export',
    method: 'get',
    params: query
  })
}
